<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>PHP IDS</title>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>

  <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td class="title">PHP IDS</td></tr>
      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>

      <tr>
        <td width="100%">
          <table cellpadding="1" border="0" width="100%">
            <tr>
              <td class="headerItem" width="20%">Current view:</td>
              <td class="headerValue" width="80%" colspan="4"><a href="index.html">/home/lars/Projekte/php-ids/refactoring_001/src/IDS</a>/<a href="Log.html">Log</a>/<a href="Log_File.php.html">File.php</a></td>
            </tr>
            <tr>
              <td class="headerItem" width="20%">Date:</td>
              <td class="headerValue" width="20%">Wed May 16 0:44:30 CEST 2007</td>
              <td width="20%"></td>
              <td class="headerItem" width="20%">Executable lines:</td>
              <td class="headerValue" width="20%">24</td>
            </tr>
            <tr>
              <td class="headerItem" width="20%">Code covered:</td>
              <td class="headerValue" width="20%">79.17%</td>
              <td width="20%"></td>
              <td class="headerItem" width="20%">Executed lines:</td>
              <td class="headerValue" width="20%">19</td>
            </tr>
            <tr>
              <td class="legendItem" width="20%">Legend:</td>
              <td class="legendValue" width="80%" colspan="4">
                <span class="legendCov">executed</span>
                <span class="legendNoCov">not executed</span>
                <span class="legendDeadCode">dead code</span>
              </td>
            </tr>
          </table>
        </td>
      </tr>

      <tr>
        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
      </tr>
    </table>

    <br />

    <table cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td><br /></td>
      </tr>
      <tr>
        <td>
<pre class="source">
<span class="lineNum"><a name="1"></a><a href="#1">       1</a> </span>                : <span class="default">&lt;?php</span>                                                                                  
<span class="lineNum"><a name="2"></a><a href="#2">       2</a> </span>                :                                                                                        
<span class="lineNum"><a name="3"></a><a href="#3">       3</a> </span>                : <span class="comment">/**</span>                                                                                    
<span class="lineNum"><a name="4"></a><a href="#4">       4</a> </span>                : <span class="comment">*&nbsp;PHP&nbsp;IDS</span>                                                                              
<span class="lineNum"><a name="5"></a><a href="#5">       5</a> </span>                : <span class="comment">*&nbsp;</span>                                                                                      
<span class="lineNum"><a name="6"></a><a href="#6">       6</a> </span>                : <span class="comment">*&nbsp;Requirements:&nbsp;PHP5,&nbsp;SimpleXML,&nbsp;MultiByte&nbsp;Extension&nbsp;(optional)</span>                        
<span class="lineNum"><a name="7"></a><a href="#7">       7</a> </span>                : <span class="comment">*&nbsp;&nbsp;</span>                                                                                      
<span class="lineNum"><a name="8"></a><a href="#8">       8</a> </span>                : <span class="comment">*&nbsp;Copyright&nbsp;2007&nbsp;Mario&nbsp;Heiderich&nbsp;for&nbsp;Ormigo&nbsp;</span>                                            
<span class="lineNum"><a name="9"></a><a href="#9">       9</a> </span>                : <span class="comment">*&nbsp;</span>                                                                                      
<span class="lineNum"><a name="10"></a><a href="#10">      10</a> </span>                : <span class="comment">*&nbsp;Permission&nbsp;is&nbsp;hereby&nbsp;granted,&nbsp;free&nbsp;of&nbsp;charge,&nbsp;to&nbsp;any&nbsp;person&nbsp;obtaining&nbsp;a&nbsp;copy&nbsp;</span>         
<span class="lineNum"><a name="11"></a><a href="#11">      11</a> </span>                : <span class="comment">*&nbsp;of&nbsp;this&nbsp;software&nbsp;and&nbsp;associated&nbsp;documentation&nbsp;files&nbsp;(the&nbsp;&quot;Software&quot;),&nbsp;to&nbsp;deal&nbsp;</span>        
<span class="lineNum"><a name="12"></a><a href="#12">      12</a> </span>                : <span class="comment">*&nbsp;in&nbsp;the&nbsp;Software&nbsp;without&nbsp;restriction,&nbsp;including&nbsp;without&nbsp;limitation&nbsp;the&nbsp;rights&nbsp;to&nbsp;use,&nbsp;</span> 
<span class="lineNum"><a name="13"></a><a href="#13">      13</a> </span>                : <span class="comment">*&nbsp;copy,&nbsp;modify,&nbsp;merge,&nbsp;publish,&nbsp;distribute,&nbsp;sublicense,&nbsp;and/or&nbsp;sell&nbsp;copies&nbsp;of&nbsp;the&nbsp;</span>      
<span class="lineNum"><a name="14"></a><a href="#14">      14</a> </span>                : <span class="comment">*&nbsp;Software,&nbsp;and&nbsp;to&nbsp;permit&nbsp;persons&nbsp;to&nbsp;whom&nbsp;the&nbsp;Software&nbsp;is&nbsp;furnished&nbsp;to&nbsp;do&nbsp;so,&nbsp;</span>          
<span class="lineNum"><a name="15"></a><a href="#15">      15</a> </span>                : <span class="comment">*&nbsp;subject&nbsp;to&nbsp;the&nbsp;following&nbsp;conditions:</span>                                                 
<span class="lineNum"><a name="16"></a><a href="#16">      16</a> </span>                : <span class="comment">*&nbsp;</span>                                                                                      
<span class="lineNum"><a name="17"></a><a href="#17">      17</a> </span>                : <span class="comment">*&nbsp;The&nbsp;above&nbsp;copyright&nbsp;notice&nbsp;and&nbsp;this&nbsp;permission&nbsp;notice&nbsp;shall&nbsp;be&nbsp;included&nbsp;in&nbsp;</span>           
<span class="lineNum"><a name="18"></a><a href="#18">      18</a> </span>                : <span class="comment">*&nbsp;all&nbsp;copies&nbsp;or&nbsp;substantial&nbsp;portions&nbsp;of&nbsp;the&nbsp;Software.</span>                                  
<span class="lineNum"><a name="19"></a><a href="#19">      19</a> </span>                : <span class="comment">*&nbsp;</span>                                                                                      
<span class="lineNum"><a name="20"></a><a href="#20">      20</a> </span>                : <span class="comment">*&nbsp;THE&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;&quot;AS&nbsp;IS&quot;,&nbsp;WITHOUT&nbsp;WARRANTY&nbsp;OF&nbsp;ANY&nbsp;KIND,&nbsp;EXPRESS&nbsp;OR&nbsp;</span>           
<span class="lineNum"><a name="21"></a><a href="#21">      21</a> </span>                : <span class="comment">*&nbsp;IMPLIED,&nbsp;INCLUDING&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,&nbsp;</span>             
<span class="lineNum"><a name="22"></a><a href="#22">      22</a> </span>                : <span class="comment">*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE&nbsp;AND&nbsp;NONINFRINGEMENT.&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;</span>              
<span class="lineNum"><a name="23"></a><a href="#23">      23</a> </span>                : <span class="comment">*&nbsp;THE&nbsp;AUTHORS&nbsp;OR&nbsp;COPYRIGHT&nbsp;HOLDERS&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;CLAIM,&nbsp;DAMAGES&nbsp;OR&nbsp;OTHER&nbsp;LIABILITY,&nbsp;</span>
<span class="lineNum"><a name="24"></a><a href="#24">      24</a> </span>                : <span class="comment">*&nbsp;WHETHER&nbsp;IN&nbsp;AN&nbsp;ACTION&nbsp;OF&nbsp;CONTRACT,&nbsp;TORT&nbsp;OR&nbsp;OTHERWISE,&nbsp;ARISING&nbsp;FROM,&nbsp;OUT&nbsp;OF&nbsp;OR&nbsp;IN&nbsp;</span>      
<span class="lineNum"><a name="25"></a><a href="#25">      25</a> </span>                : <span class="comment">*&nbsp;CONNECTION&nbsp;WITH&nbsp;THE&nbsp;SOFTWARE&nbsp;OR&nbsp;THE&nbsp;USE&nbsp;OR&nbsp;OTHER&nbsp;DEALINGS&nbsp;IN&nbsp;THE&nbsp;SOFTWARE.</span>           
<span class="lineNum"><a name="26"></a><a href="#26">      26</a> </span>                : <span class="comment">*/</span>                                                                                     
<span class="lineNum"><a name="27"></a><a href="#27">      27</a> </span>                :                                                                                        
<span class="lineNum"><a name="28"></a><a href="#28">      28</a> </span>                : <span class="comment">/**</span>                                                                                    
<span class="lineNum"><a name="29"></a><a href="#29">      29</a> </span>                : <span class="comment">*&nbsp;This&nbsp;file&nbsp;is&nbsp;hosted&nbsp;on&nbsp;Google&nbsp;Code&nbsp;and&nbsp;can&nbsp;be&nbsp;</span>                                        
<span class="lineNum"><a name="30"></a><a href="#30">      30</a> </span>                : <span class="comment">*&nbsp;discussed&nbsp;on&nbsp;Google&nbsp;Groups</span>                                                           
<span class="lineNum"><a name="31"></a><a href="#31">      31</a> </span>                : <span class="comment">*&nbsp;</span>                                                                                      
<span class="lineNum"><a name="32"></a><a href="#32">      32</a> </span>                : <span class="comment">*&nbsp;http://code.google.com/p/phpids/&nbsp;</span>                                                     
<span class="lineNum"><a name="33"></a><a href="#33">      33</a> </span>                : <span class="comment">*&nbsp;http://groups.google.de/group/php-ids/</span>                                               
<span class="lineNum"><a name="34"></a><a href="#34">      34</a> </span>                : <span class="comment">*&nbsp;</span>                                                                                      
<span class="lineNum"><a name="35"></a><a href="#35">      35</a> </span>                : <span class="comment">*/</span>                                                                                     
<span class="lineNum"><a name="36"></a><a href="#36">      36</a> </span>                :                                                                                        
<span class="lineNum"><a name="37"></a><a href="#37">      37</a> </span>                : <span class="keyword">require_once</span><span class="default">&nbsp;</span><span class="string">'IDS/Log/Interface.php'</span><span class="keyword">;</span>                                                  
<span class="lineNum"><a name="38"></a><a href="#38">      38</a> </span>                :                                                                                        
<span class="lineNum"><a name="39"></a><a href="#39">      39</a> </span>                : <span class="comment">/**</span>                                                                                    
<span class="lineNum"><a name="40"></a><a href="#40">      40</a> </span>                : <span class="comment">*&nbsp;File&nbsp;wrapper</span>                                                                         
<span class="lineNum"><a name="41"></a><a href="#41">      41</a> </span>                : <span class="comment">*</span>                                                                                      
<span class="lineNum"><a name="42"></a><a href="#42">      42</a> </span>                : <span class="comment">*&nbsp;This&nbsp;class&nbsp;is&nbsp;designed&nbsp;to&nbsp;store&nbsp;incoming&nbsp;data&nbsp;in</span>                                     
<span class="lineNum"><a name="43"></a><a href="#43">      43</a> </span>                : <span class="comment">*&nbsp;a&nbsp;file&nbsp;and&nbsp;implements&nbsp;the&nbsp;singleton&nbsp;pattern</span>                                          
<span class="lineNum"><a name="44"></a><a href="#44">      44</a> </span>                : <span class="comment">*</span>                                                                                      
<span class="lineNum"><a name="45"></a><a href="#45">      45</a> </span>                : <span class="comment">*&nbsp;@author&nbsp;&nbsp;&nbsp;&nbsp;christ1an&nbsp;&lt;ch0012@gmail.com&gt;</span>                                                 
<span class="lineNum"><a name="46"></a><a href="#46">      46</a> </span>                : <span class="comment">*/</span>                                                                                     
<span class="lineNum"><a name="47"></a><a href="#47">      47</a> </span>                : <span class="keyword">class</span><span class="default">&nbsp;</span><span class="default">IDS_Log_File</span><span class="default">&nbsp;</span><span class="default">implements</span><span class="default">&nbsp;</span><span class="default">IDS_Log_Interface</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                      
<span class="lineNum"><a name="48"></a><a href="#48">      48</a> </span>                :                                                                                        
<span class="lineNum"><a name="49"></a><a href="#49">      49</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$logfile</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">null</span><span class="keyword">;</span>                                                              
<span class="lineNum"><a name="50"></a><a href="#50">      50</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">static</span><span class="default">&nbsp;</span><span class="default">$instances</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                  
<span class="lineNum"><a name="51"></a><a href="#51">      51</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="52"></a><a href="#52">      52</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                   
<span class="lineNum"><a name="53"></a><a href="#53">      53</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Constructor</span>                                                                         
<span class="lineNum"><a name="54"></a><a href="#54">      54</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                     
<span class="lineNum"><a name="55"></a><a href="#55">      55</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;string</span>                                                                       
<span class="lineNum"><a name="56"></a><a href="#56">      56</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;protected</span>                                                                   
<span class="lineNum"><a name="57"></a><a href="#57">      57</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span>                                                                        
<span class="lineNum"><a name="58"></a><a href="#58">      58</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                    
<span class="lineNum"><a name="59"></a><a href="#59">      59</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">protected</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">__construct</span><span class="keyword">(</span><span class="default">$logfile</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                            
<span class="lineNum"><a name="60"></a><a href="#60">      60</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">logfile</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">$logfile</span><span class="keyword">;</span>                                                           </span>
<span class="lineNum"><a name="61"></a><a href="#61">      61</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                     </span>
<span class="lineNum"><a name="62"></a><a href="#62">      62</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="63"></a><a href="#63">      63</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                   
<span class="lineNum"><a name="64"></a><a href="#64">      64</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;an&nbsp;instance&nbsp;of&nbsp;this&nbsp;class</span>                                                   
<span class="lineNum"><a name="65"></a><a href="#65">      65</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                     
<span class="lineNum"><a name="66"></a><a href="#66">      66</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;string</span>                                                                       
<span class="lineNum"><a name="67"></a><a href="#67">      67</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span>                                                                      
<span class="lineNum"><a name="68"></a><a href="#68">      68</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;object</span>                                                                      
<span class="lineNum"><a name="69"></a><a href="#69">      69</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                    
<span class="lineNum"><a name="70"></a><a href="#70">      70</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">static</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">getInstance</span><span class="keyword">(</span><span class="default">$logfile</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                        
<span class="lineNum"><a name="71"></a><a href="#71">      71</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="keyword">isset</span><span class="keyword">(</span><span class="default">self</span><span class="keyword">::</span><span class="default">$instances</span><span class="keyword">[</span><span class="default">$logfile</span><span class="keyword">]</span><span class="keyword">)</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                            </span>
<span class="lineNum"><a name="72"></a><a href="#72">      72</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">$instances</span><span class="keyword">[</span><span class="default">$logfile</span><span class="keyword">]</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">(</span><span class="default">$logfile</span><span class="keyword">)</span><span class="keyword">;</span>                                    </span>
<span class="lineNum"><a name="73"></a><a href="#73">      73</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                    </span>
<span class="lineNum"><a name="74"></a><a href="#74">      74</a> </span>                :                                                                                        
<span class="lineNum"><a name="75"></a><a href="#75">      75</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">$instances</span><span class="keyword">[</span><span class="default">$logfile</span><span class="keyword">]</span><span class="keyword">;</span>                                                   </span>
<span class="lineNum"><a name="76"></a><a href="#76">      76</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                     </span>
<span class="lineNum"><a name="77"></a><a href="#77">      77</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="78"></a><a href="#78">      78</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                   
<span class="lineNum"><a name="79"></a><a href="#79">      79</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Just&nbsp;for&nbsp;the&nbsp;sake&nbsp;of&nbsp;completeness</span>                                                   
<span class="lineNum"><a name="80"></a><a href="#80">      80</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;of&nbsp;a&nbsp;correct&nbsp;singleton&nbsp;pattern</span>                                                      
<span class="lineNum"><a name="81"></a><a href="#81">      81</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                    
<span class="lineNum"><a name="82"></a><a href="#82">      82</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">__clone</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span><span class="default">&nbsp;</span><span class="keyword">}</span>                                                        </span>
<span class="lineNum"><a name="83"></a><a href="#83">      83</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="84"></a><a href="#84">      84</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                   
<span class="lineNum"><a name="85"></a><a href="#85">      85</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Converts&nbsp;data&nbsp;that&nbsp;is&nbsp;passed&nbsp;to&nbsp;Log_File::execute()</span>                                 
<span class="lineNum"><a name="86"></a><a href="#86">      86</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;into&nbsp;a&nbsp;format&nbsp;that&nbsp;can&nbsp;be&nbsp;stored&nbsp;in&nbsp;a&nbsp;file</span>                                          
<span class="lineNum"><a name="87"></a><a href="#87">      87</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                     
<span class="lineNum"><a name="88"></a><a href="#88">      88</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;You&nbsp;might&nbsp;edit&nbsp;this&nbsp;method&nbsp;to&nbsp;your&nbsp;requirements</span>                                     
<span class="lineNum"><a name="89"></a><a href="#89">      89</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                     
<span class="lineNum"><a name="90"></a><a href="#90">      90</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;mixed</span>                                                                        
<span class="lineNum"><a name="91"></a><a href="#91">      91</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;protected</span>                                                                   
<span class="lineNum"><a name="92"></a><a href="#92">      92</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;mixed</span>                                                                       
<span class="lineNum"><a name="93"></a><a href="#93">      93</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                    
<span class="lineNum"><a name="94"></a><a href="#94">      94</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">protected</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">prepareData</span><span class="keyword">(</span><span class="default">$data</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                               
<span class="lineNum"><a name="95"></a><a href="#95">      95</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="default">serialize</span><span class="keyword">(</span><span class="default">$data</span><span class="keyword">)</span><span class="keyword">;</span>                                                             </span>
<span class="lineNum"><a name="96"></a><a href="#96">      96</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                     </span>
<span class="lineNum"><a name="97"></a><a href="#97">      97</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="98"></a><a href="#98">      98</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                   
<span class="lineNum"><a name="99"></a><a href="#99">      99</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Stores&nbsp;incoming&nbsp;data&nbsp;record&nbsp;into&nbsp;a&nbsp;file</span>                                             
<span class="lineNum"><a name="100"></a><a href="#100">     100</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                     
<span class="lineNum"><a name="101"></a><a href="#101">     101</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;mixed</span>                                                                        
<span class="lineNum"><a name="102"></a><a href="#102">     102</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span>                                                                      
<span class="lineNum"><a name="103"></a><a href="#103">     103</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;mixed&nbsp;&nbsp;&nbsp;&nbsp;bool&nbsp;or&nbsp;exception&nbsp;object&nbsp;on&nbsp;failure</span>                                   
<span class="lineNum"><a name="104"></a><a href="#104">     104</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                    
<span class="lineNum"><a name="105"></a><a href="#105">     105</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">execute</span><span class="keyword">(</span><span class="default">IDS_Report</span><span class="default">&nbsp;</span><span class="default">$data</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                           
<span class="lineNum"><a name="106"></a><a href="#106">     106</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="107"></a><a href="#107">     107</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                  
<span class="lineNum"><a name="108"></a><a href="#108">     108</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;case&nbsp;the&nbsp;data&nbsp;has&nbsp;been&nbsp;modified&nbsp;before&nbsp;it&nbsp;might</span>                                 
<span class="lineNum"><a name="109"></a><a href="#109">     109</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;be&nbsp;necessary&nbsp;to&nbsp;convert&nbsp;it&nbsp;to&nbsp;string&nbsp;since&nbsp;we&nbsp;can't</span>                                
<span class="lineNum"><a name="110"></a><a href="#110">     110</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;store&nbsp;array&nbsp;or&nbsp;object&nbsp;in&nbsp;a&nbsp;file</span>                                                    
<span class="lineNum"><a name="111"></a><a href="#111">     111</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                   
<span class="lineNum"><a name="112"></a><a href="#112">     112</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$data</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">prepareData</span><span class="keyword">(</span><span class="default">$data</span><span class="keyword">)</span><span class="keyword">;</span>                                                   </span>
<span class="lineNum"><a name="113"></a><a href="#113">     113</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="114"></a><a href="#114">     114</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">is_string</span><span class="keyword">(</span><span class="default">$data</span><span class="keyword">)</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                              </span>
<span class="lineNum"><a name="115"></a><a href="#115">     115</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">file_exists</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">logfile</span><span class="keyword">)</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                  </span>
<span class="lineNum"><a name="116"></a><a href="#116">     116</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$data</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">trim</span><span class="keyword">(</span><span class="default">$data</span><span class="keyword">)</span><span class="keyword">;</span>                                                               </span>
<span class="lineNum"><a name="117"></a><a href="#117">     117</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="118"></a><a href="#118">     118</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="keyword">empty</span><span class="keyword">(</span><span class="default">$data</span><span class="keyword">)</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                               </span>
<span class="lineNum"><a name="119"></a><a href="#119">     119</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$handle</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">fopen</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">logfile</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="string">'a'</span><span class="keyword">)</span><span class="keyword">;</span>                                             </span>
<span class="lineNum"><a name="120"></a><a href="#120">     120</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">fwrite</span><span class="keyword">(</span><span class="default">$handle</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$data</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="string">&quot;\n&quot;</span><span class="keyword">)</span><span class="keyword">;</span>                                                    </span>
<span class="lineNum"><a name="121"></a><a href="#121">     121</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">fclose</span><span class="keyword">(</span><span class="default">$handle</span><span class="keyword">)</span><span class="keyword">;</span>                                                                  </span>
<span class="lineNum"><a name="122"></a><a href="#122">     122</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                  </span>
<span class="lineNum"><a name="123"></a><a href="#123">     123</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span><span class="default">&nbsp;</span><span class="keyword">else</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                            </span>
<span class="lineNum"><a name="124"></a><a href="#124">     124</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Exception</span><span class="keyword">(</span>                                                               </span>
<span class="lineNum"><a name="125"></a><a href="#125">     125</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="string">'Given&nbsp;file&nbsp;does&nbsp;not&nbsp;exist.'</span>                                                      
<span class="lineNum"><a name="126"></a><a href="#126">     126</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                 </span>
<span class="lineNum"><a name="127"></a><a href="#127">     127</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                   
<span class="lineNum"><a name="128"></a><a href="#128">     128</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span><span class="default">&nbsp;</span><span class="keyword">else</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                             </span>
<span class="lineNum"><a name="129"></a><a href="#129">     129</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Exception</span><span class="keyword">(</span>                                                                </span>
<span class="lineNum"><a name="130"></a><a href="#130">     130</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="string">'Please&nbsp;make&nbsp;sure&nbsp;that&nbsp;data&nbsp;returned&nbsp;by&nbsp;</span>                                            
<span class="lineNum"><a name="131"></a><a href="#131">     131</a> </span>                : <span class="string">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log_File::prepareData()&nbsp;is&nbsp;a&nbsp;string.'</span>                                             
<span class="lineNum"><a name="132"></a><a href="#132">     132</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                  </span>
<span class="lineNum"><a name="133"></a><a href="#133">     133</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                    
<span class="lineNum"><a name="134"></a><a href="#134">     134</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="135"></a><a href="#135">     135</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="default">true</span><span class="keyword">;</span>                                                                         </span>
<span class="lineNum"><a name="136"></a><a href="#136">     136</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                     </span>
<span class="lineNum"><a name="137"></a><a href="#137">     137</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span>                                                                                       
<span class="lineNum"><a name="138"></a><a href="#138">     138</a> </span>                : <span class="keyword">}</span>                                                                                      
<span class="lineNum"><a name="139"></a><a href="#139">     139</a> </span>                : <span class="comment">/*</span>                                                                                     
<span class="lineNum"><a name="140"></a><a href="#140">     140</a> </span>                : <span class="comment">&nbsp;*&nbsp;Local&nbsp;variables:</span>                                                                    
<span class="lineNum"><a name="141"></a><a href="#141">     141</a> </span>                : <span class="comment">&nbsp;*&nbsp;tab-width:&nbsp;4</span>                                                                        
<span class="lineNum"><a name="142"></a><a href="#142">     142</a> </span>                : <span class="comment">&nbsp;*&nbsp;c-basic-offset:&nbsp;4</span>                                                                   
<span class="lineNum"><a name="143"></a><a href="#143">     143</a> </span>                : <span class="comment">&nbsp;*&nbsp;End:</span>                                                                                
<span class="lineNum"><a name="144"></a><a href="#144">     144</a> </span>                : <span class="comment">&nbsp;*/</span>                                                                                    
<span class="lineNum"><a name="145"></a><a href="#145">     145</a> </span>                :                                                                                        
<span class="lineNum"><a name="146"></a><a href="#146">     146</a> </span>                : 

</pre>
        </td>
      </tr>
    </table>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
      <tr><td class="versionInfo">Generated by: <a href="http://www.phpunit.de/">PHPUnit 3.0.0</a> and <a href="http://www.xdebug.org/">Xdebug 2.0.0RC2</a>.</td></tr>
    </table>

    <br />

  </body>
</html>
